package com.mykt.service.impl;

import com.mykt.domain.SystemUser;
import com.mykt.exception.MyServiceException;
import com.mykt.mapper.SystemUserMapper;
import com.mykt.service.SystemUserService;
import com.mykt.utils.StringUtils;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Service;

/**
 * 系统登录日志 服务层
 */
@Service
public class SystemUserServiceImpl  implements SystemUserService
{

    @Autowired
    private SystemUserMapper systemUserMapper;

    @Override
    public SystemUser getInfo(String  userName)  {
        if(StringUtils.isEmpty(userName)){
          throw new MyServiceException("用户名不能为空");
        }
        SystemUser systemUser=systemUserMapper.getInfo(userName);
        return systemUser;
    }


}
